package com.xixibaby.redis.login;

import com.alibaba.fastjson.JSONObject;

import com.xixibaby.core.SuperResponse;
import com.xixibaby.core.auth.AuthCenter;
import com.xixibaby.core.login.LoginInfoVO;
import com.xixibaby.redis.Login;

import java.util.List;

/**
 *
 * @author tooomj
 */
public abstract class RedisAuthCenter extends AuthCenter {

    @Override
    public boolean support(LoginInfoVO loginInfo,String url) {
        String userInfo = Login.user(loginInfo);
        SuperResponse superResponse = JSONObject.parseObject(userInfo, SuperResponse.class);
        //List<String> strings = Login.authList(loginInfo);
        return superResponse.getId().equals(loginInfo.getUserId()) ;
    }
}
